package cn.yuanqiao.web.controller.manage;

import cn.yuanqiao.common.annotation.Log;
import cn.yuanqiao.common.core.controller.BaseController;
import cn.yuanqiao.common.core.domain.AjaxResult;
import cn.yuanqiao.common.enums.BusinessType;
import cn.yuanqiao.manage.service.IMijiComparisonTableService;
import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: 赵常飞
 * @Date: 2024/6/4 10:35
 * @Description:
 * @Note:
 */
@RestController
@RequestMapping("/manager/mjdzb")
public class MijiComparisonTableController extends BaseController {
    @Autowired
    private IMijiComparisonTableService iMijiComparisonTableService;

    @Log(title = "获取人员密级字典", businessType = BusinessType.SELECT)
    @GetMapping("/getrymjdict")
    public AjaxResult getcatemodeltree() {
        return success(iMijiComparisonTableService.getrymjdict());
    }

    @Log(title = "获取档案密级字典", businessType = BusinessType.SELECT)
    @GetMapping("/getdamjdict")
    public AjaxResult getdamjdict() {
        return success(iMijiComparisonTableService.getdamjdict());
    }

    @Log(title = "保存人员密级对照表", businessType = BusinessType.INSERT)
    @PostMapping("/save")
    public AjaxResult save(@RequestBody JSONObject json) {
        return success(iMijiComparisonTableService.save(json));
    }

    @Log(title = "获取密级对照表回显", businessType = BusinessType.SELECT)
    @GetMapping("/getmjdzb")
    public AjaxResult getmjdzb() {
        return success(iMijiComparisonTableService.getmjdzb());
    }
}

